/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-04-24
 * Time: 16:49
 */
public class Narcissistic {
    public static void main(String[] args) {
        for (int i = 100; i <= 999; i++) {
            int num = i;
            int total = 0;
            while(num!=0){
                int tmp = num%10;
                total += tmp*tmp*tmp;
                num /= 10;
            }
            if(total == i)
                System.out.println(i);
        }
    }
}
